import { openBuildService } from '../../helper/service'

// 值类型为String或Object,String为url(method),Object同axios(config)参数支持相同,data和params只能为对象类型
const settings = {
  // 大屏数据维护设置-列表数据
  getNewsList: {
    url: '/proxy/admin/v1/CulManagePartyBuild/getDataList',
    method: 'get'
  },
  //新增新闻
  addNews: {
    url: '/proxy/admin/v1/CulManagePartyBuild/addNews',
    method: 'post'
  },
  //修改新闻
  editNews: {
    url: '/proxy/admin/v1/CulManagePartyBuild/editNews',
    method: 'put'
  },
  //删除新闻
  delNews: {
    url: '/proxy/admin/v1/CulManagePartyBuild/delNews',
    method: 'delete',
    type: 'restful'
  },
  //排序
  updateNewsSort: {
    url: '/proxy/admin/v1/CulManagePartyBuild/newsSort',
    method: 'put',
  },
  // 新闻方案列表
  getNewsSchemeList: {
    url: '/proxy/admin/v1/CulManagePartyBuild/schemes',
    method: 'get'
  },
  // 新增新闻方案
  createNewsScheme: {
    url: '/proxy/admin/v1/CulManagePartyBuild/addScheme',
    method: 'post'
  },
  // 修改新闻方案
  updateNewsScheme: {
    url: '/proxy/admin/v1/CulManagePartyBuild/editScheme',
    method: 'post'
  },
  // 删除新闻方案
  // deleteNewsScheme: {
  //     url: '/proxy/admin/v1/CulManagePartyBuild/delScheme',
  //     method: 'delete',
  //     type: 'restful'
  // },
  // 新闻关联方案
  newsRelateScheme: {
    url: '/proxy/admin/v1/CulManagePartyBuild/relaScheme',
    method: 'put'
  },
  // 删除关联关系
  deleteRelation: {
    url: '/proxy/admin/v1/CulManagePartyBuild/delSchemeRela',
    method: 'delete'
  },
  // 编辑添加新闻
  addEditNews: {
    url: '/ydt/aArticleLibrary/editAArticleLibrary',
    method: 'post'
  },
  // 获取新闻列表
  getNewsListTwo: {
    url: '/ydt/aArticleLibrary/getAArticleLibraryForm',
    method: 'get'
  },
  // 删除新闻列表
  deleteNews: {
    url: '/ydt/aArticleLibrary/del',
    method: 'delete'
  },
  // 查询新闻方案
  getNewsScheme: {
    url: '/ydt/aScheme/getDetail',
    method: 'get'
  },
  // 查询方案下的新闻列表
  getSchemeNews: {
    url: '/ydt/aScheme/getNews',
    method: 'get'
  },
  // 编辑新闻方案
  addEditNewsScheme: {
    url: '/ydt/aScheme/editAScheme',
    method: 'post'
  },
  // 删除新闻方案
  deleteNewsScheme: {
    url: '/ydt/aScheme/del',
    method: 'delete'
  },
  // 发布新闻方案
  publishNews: {
    url: '/ydt/aScheme/publish',
    method: 'post'
  },
  // 批量标记
  bulkTagging: {
    url: '/ydt/aArticleLibrary/batch',
    method: 'post'
  },
  // 项目方案排序
  newsSort: {
    url: '/ydt/aScheme/change',
    method: 'post'
  },
  // 企业新闻-批量标记
  batchTagCompanyNews: {
    url: '/ydt/companyNew/batch',
    method: 'post'
  },
  // 企业新闻-移除
  removeCompanyNews: {
    url: '/ydt/companyNew/del',
    method: 'delete'
  },
  // 企业新闻-交换
  exchangeCompanyNews: {
    url: '/ydt/companyNew/exchange',
    method: 'post'
  },
  // 企业新闻-查询单位下所有新闻
  getCompanyNews: {
    url: '/ydt/companyNew/getCompanyNews',
    method: 'get'
  },
  // 企业新闻-查询单位方案列表
  getCompanySchemes: {
    url: '/ydt/companyNew/getList',
    method: 'get'
  },
  // 企业新闻-列表
  getCompanyNewsList: {
    url: '/ydt/aArticleLibrary/getWithCompany',
    method: 'get'
  }
}
export default openBuildService(settings)